protocol_headers = [
    'protocol.h'
]

protocol_sources = [
    'protocol.cpp'
]

libprotocol = shared_library(
    'dev_protocol',
    protocol_sources,
    include_directories: dev_inc_dir,
    dependencies: [libmcpp_deps],
    install: true,
    install_dir: lib_dir,
)

libprotocol_dep = declare_dependency(
    link_with: libprotocol,
    include_directories: [dev_inc_dir],
    dependencies: [libmcpp_deps],
)

install_headers(protocol_headers, install_dir: install_inc_dir / 'protocol')

if build_tests and meson_build
  custom_target(
    'copy_dev_protocol',
    output: 'copy_dev_protocol',
    command: ['cp', libprotocol.full_path(), lib_dir],
    depends: libprotocol,
    build_by_default: true,
  )
endif